A virtual machine is a software implementation of a machine that executes instructions like a physical machine. The virtual machine is susceptible to the same malicious attacks as a physical machine. Plug and play can allow a peripheral to be connected to a machine without user involvement to configure the peripheral. If the peripheral was malicious it may infect the virtual machine.